home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 116 / MacAddict 116 (Mac Power Pack)(theDISC)(April 2006).iso / Software / Internet & Communication / Jon's Phone Tool.dmg / Goodies / JPT Vonage Account Toggle.applescript < prev    next >
Text File  |  2005-11-12  |  1KB  |  30 lines

  1. using terms from application "Jon's Phone Tool"
  2.     --modify the information in these accounts accordingly, account_name can be whatever you wish:
  3.     property account_1 : {account_name:"Account 1", property_record:{Vonage username:"", Vonage password:"", Vonage number:""}}
  4.     property account_2 : {account_name:"Account 2", property_record:{Vonage username:"", Vonage password:"", Vonage number:""}}
  5. end using terms from
  6.  
  7. --**************************************--
  8. -- don't adjust anything below this part of the script --
  9. --**************************************--
  10.  
  11. property last_account : missing value
  12.  
  13. if last_account = missing value then set last_account to account_name of account_2
  14. if last_account = (account_name of account_2) then
  15.     set property_record to property_record of account_1
  16.     set account_name to account_name of account_1
  17. else
  18.     set property_record to property_record of account_2
  19.     set account_name to account_name of account_2
  20. end if
  21. set last_account to account_name
  22.  
  23. tell application "Jon's Phone Tool" to set Vonage settings to property_record
  24.  
  25. tell application "System Events"
  26.     activate
  27.     display dialog "JPT will now dial via Vonage using account " & account_name & "." buttons {"OK"} default button 1 with icon 1 giving up after 5
  28. end tell
  29.  
  30.